package com.feicheng.house.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.feicheng.house.entity.BuyOrder;
import com.feicheng.house.entity.BuyOrderClientShopVo;
import com.feicheng.house.result.ResultInfo;
import com.feicheng.house.service.IBuyOrderClientShopVoService;

/**
 * <p>
 * VIEW 前端控制器
 * </p>
 *
 * @author feichengTech
 * @since 2021-11-09
 */
@RestController
@RequestMapping("/house/buy-order-client-shop-vo")
public class BuyOrderClientShopVoController {
	@Autowired
	IBuyOrderClientShopVoService iBuyOrderClientShopVoService;
	/**
	 * 根据id查询
	 * @param buyOrderId
	 * @return 查到的订单详情
	 */
	@GetMapping("/info")
	ResultInfo seleOne(Integer buyOrderId) {
		return iBuyOrderClientShopVoService.seleOne(buyOrderId);
	}
	/**
	 * 分页查询
	 * @param currentPage
	 * @param pageSize
	 * @param searchkey
	 * @return 查询到的订单详情和分页详情
	 */
	@GetMapping("/page")
	ResultInfo selectBuyOrder(@RequestParam(required = false,defaultValue = "1") Integer currentPage,
			   @RequestParam(required = false,defaultValue = "10")Integer pageSize,
			   @RequestParam(required = false) String searchkey,
			   @RequestParam(required = false) String searchstart,
			   @RequestParam(required = false) String searchstart1,
			   @RequestParam(required = false) String searchend,
			   @RequestParam(required = false) String searchend1,
			   @RequestParam(required = false) String searchstatus) {
		return iBuyOrderClientShopVoService.selectBuyOrder(currentPage, pageSize, searchkey,searchstart,searchstart1 ,searchend,searchend1,searchstatus);
	}
	
}

